package tree;

import javax.swing.*;
import java.awt.*;
import java.io.IOException;

public class Token {
    public final int tag;
    public String value;


    public Token(int t) {
        tag = t;
        value = "";
    }

    public Token(int t, String v) {
        tag = t;
        value = v;
    }

    public boolean matchToken(int tag) {
        if (this.tag == tag)
            return true;
        else
            return false;
    }

    public String emitToken() {
        System.out.println("<" + tag + ", " + value + ">");
        return "<" + tag + ", " + value + ">";
    }

    public static void main(String[] args) throws IOException {


        Parser par = new Parser();
        Node root;
        root=par.parseTree();
        root.treePrint();

    }
}